%% qMT Sensitivity Analysis
% Version: 0.1
%
% PROJECT MANAGER: Mathieu Boudreau (_MJB)
% DESCRIPTION: This code explores numerically the sensitivity of the qMT
% signal for different delta parameters.
%
% LAST EDITED BY: Mathieu Boudreau (_MJB)
%


%% Clear Matlab
%

clear all
clc
close all

%% Startup
%

my_path;

startup;                    

set(0, 'DefaultAxesBox', 'on', 'DefaultAxesLineWidth', 6);
set(0, 'DefaultAxesFontSize', 30, 'DefaultAxesFontWeight', 'bold');

%% Set Measurement Parameters
%

sMeasurementParameters = 'UKProtocol_3T';

protocolFlag = 'custom';

%% Set Tissue Parameters
%

sTissueParameters = 'wm_mt_system_params_3t';

%%
%

deltaFPerc_range = logspace(-5,2,8);
sParam = 'F'
for ii = 1:length(deltaFPerc_range)
    deltaParam = deltaFPerc_range(ii);
    sensitivity_F{ii} = simulate_sensitivity(protocolFlag, sTissueParameters, sMeasurementParameters, sParam, deltaParam)
end


%%
%
load(sMeasurementParameters)
for ii = length(sensitivity_F):-1:1
    plot_sensitivity(protocol,sensitivity_F{ii},'F',deltaFPerc_range(ii))
    pause(1)
end
